<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base target="_self">
    <title>修改班级</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="修改,班级">
	<meta http-equiv="description" content="This is my page">

	<style type="text/css">
	</style>

  </head>
  
  <body>
    <center>
    	<s:form name="frm" id="frm" method="post" action="" namespace="">
    		<jsp:include page="/jsp/outward/business/common/menuLink.jsp">
    			<jsp:param name="menuLink" value="[{'name':'公共管理'},{'name':'班级管理'},{'name':'修改班级'}]"/>
    			<jsp:param name="width" value="75%"/>
    		</jsp:include>
    		
    		<s:hidden name="cla.id" id="classId"></s:hidden>
    		
    		<table width="100%" cellspacing="1" cellpadding="3" bgcolor="#CCCCCC">
    			<tr bgcolor="#FFFFFF">
    				<td width="20%" align="right" class="label">
    					班级名称：
    					<br>
    					<font color="red">(20字以内)</font>
    				</td>
    				<td width="80%" align="left">
    					<s:textfield name="cla.className" id="className" cssStyle="width:90%" maxlength="20"></s:textfield>
    				</td>
    			</tr>
    			<tr bgcolor="#FFFFFF">
    				<td align="right" class="label">
    					班次：
    				</td>
    				<td align="left">
    					<s:select name="cla.classType" list="classTypeList" listKey="dataValue" listValue="dataValue" cssStyle="width:120px"></s:select>
    				</td>
    			</tr>
    			<tr bgcolor="#FFFFFF">
    				<td align="right" class="label">
    					成立时间：
    				</td>
    				<td align="left">
    					<input name="cla.debutDate" id="debutDate" style="width:120px" class="WDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" value="<s:date name='cla.debutDate' format='yyyy-MM-dd' />" />
    				</td>
    			</tr>
    		</table>
    		
    		<table width="100%" cellspacing="0">
    			<tr>
    				<td align="center" valign="bottom" height="30">
    					<my:hasPermission privilegeId="updateClass">
    					<input type="button" value="修改" class="btn" onclick="updateClass()" />
    					</my:hasPermission>
    				</td>
    			</tr>
    		</table>
    		
    		
    	</s:form>
    </center>
    
    <script type="text/javascript">
    function updateClass()
    {
    	var className = $('#className');
    	if(!isNotNull(className.val()))
    	{
    		showMsg('班级名称不能为空。', function(){className.focus();});
    		return;
    	}
    	var url = 'inner/common/updateClass.action';
    	ajaxAction(url, 'post', 'frm', false, function(){
    		window.opener.searchThis();
    		window.close();
    	});
    }
    </script>
  </body>
</html>
